<!--************************************************************ -->
<!--* 文件创建日期：2010                                  * -->
<!--* 文件修改日期：			                                   * -->
<!--************************************************************ -->
<!--JSP初始化设置-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.infomanage.po.*" %>
<%@page import="com.qs.po.*"%>
<%@page import="com.qs.vo.*"%>
<%@page import="com.infomanage.vo.*" %>
<%@page import="com.qs.service.*"%>
<%@page import="com.infomanage.util.Consts"%>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
	request.setCharacterEncoding("UTF-8");
	String itemId = request.getParameter("itemId");
    if(itemId == null) itemId = "";
    QsRecSummaryItem item = RecordSummaryService.load(request, response, out);
    int deptId = -1;
    String deptName = "";
    String date = "";
    String compere = "";
    String deficiency = "";
    String experience = "";
    String kind = "";
    String place = "";
    String remedy = "";
    if(item != null){
    	QsRecSummary bean = item.getBean();
    	Department dept = item.getDept();
    	deptId = dept.getDeptId();
    	deptName = dept.getPath();
    	date = bean.getDate();
    	compere = bean.getCompere();
    	deficiency = bean.getDeficiency();
    	experience = bean.getExperience();
    	kind = bean.getKind();
    	place = bean.getPlace();
    	remedy = bean.getRemedy();
    	
    }

%>
<html>
<head>
	<title>战后总结评比记录</title>
	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
	<link href="<%=request.getContextPath() %>/css/style.css" rel="stylesheet" type="text/css">
	<link href="<%=request.getContextPath() %>/css/table.css" rel="stylesheet" type="text/css">
	<link href="<%=request.getContextPath() %>/css/calendar.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="<%=request.getContextPath() %>/js/calendar.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/js/common.js"></script>
	<script type="text/javascript">
	   function init() {
		   if("" != "<%=itemId%>") { // 修改
		   }
	   }
	   // 提交
	   function doSubmit(){
	   		if(validate()){
	   			return;
	   		}
		 	if("" == "<%=itemId%>") {
		 		form1.actionType.value = "add";
			}else {
		 		form1.actionType.value = "modify";
			}
		 	form1.submit();
	   }

	   function validate(){
	   		if(form1.deptId.value == -1){
	   			alert("单位不能为空！");
	   			return true;
	   		}

	   		if(form1.date.value == ""){
	   			alert("日期不能为空！");
	   			return true;
	   		}

	   		if(form1.compere.value == ""){
	   			alert("主持人不能为空！");
	   			return true;
	   		}
	   		
	   		if(form1.kind.value == ""){
	   			alert("事故性质不能为空！");
	   			return true;
	   		}
	   		
	   		if(form1.place.value == ""){
	   			alert("事故地点不能为空！");
	   			return true;
	   		}
	   		return false;
	   }
	   
	   function showError(error){
		   alert(error);
	   }

	   function showInfo(info){
		   alert(info);
		   window.returnValue = "ok";
		   window.close();
	   }
	</script>
</head>
<body  rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0"  onload="init();" onclick="clickBody();">
	<form name="form1" action="summary_action.jsp" method="post" target="actionFrame">
	<input type="hidden" name="itemId" value="<%=itemId%>">
	<input type="hidden" name="actionType">
	
	<table class="dialogTable" cellpadding="0" cellspacing="0">
		<!-- 表头-->
		<tr class="dialogTableHeader">
			<td>战后总结评比记录</td>
		</tr>
		<!-- 表数据-->
		<tr class="dialogTableContent">
			<td>
				<!-- 数据项 -->
				<table class="dataTable">
					<col width="30%">
					<col width="70%">
					<tr>
						<td class="field" >
							单位
						</td>
						<td>
							<span class="treeSpan" onclick="showTree(this, '<%=request.getContextPath() %>/infomanage/common/deptTree.jsp');" treeSelect="true">
								<input name="deptname" style="width: 100%;" readonly="readonly" 
								treeSelect="true" value="<%=deptName %>"><input name="deptId"  type="hidden" value="<%=deptId %>">
							</span>
						</td>
					</tr>
					<tr>
						<td class="field" >
							日期
						</td>
						<td>
							<input  type="text" name="date" value="<%=date %>"  style="width: 230px;cursor: hand;" id="beginTime" onClick="return showCalendar(this.id, 'y-mm-dd');" readonly="readonly"><img 
									src="<%=request.getContextPath() %>/img/tip_calender.gif" style="cursor: hand;" width="16" height="16" onClick="return showCalendar('time', 'y-mm-dd');">
						</td>

					</tr>
					<tr>
						<td class="field" >
							主持人
						</td>
						<td>
							<span class="treeSpan" onclick="showTree(this, '<%=request.getContextPath() %>/infomanage/common/personTree.jsp');" treeSelect="true">
								<input name="compere"  value="<%=compere %>"  style="width: 100%;" readonly="readonly" 
								treeSelect="true"><input type="hidden">
							</span>
						</td>

					</tr>
					<tr>
						<td  class="field" >
							事故性质
						</td>
						<td>
							<input value="<%=kind %>" name="kind" style="width: 100%;"/>
						</td>
					</tr>
					<tr>
						<td  class="field" >
							事故地点
						</td>
						<td>
							<input value="<%=place %>" name="place" style="width: 100%;"/>
						</td>
					</tr>
					<tr height="100px">
							<td class="field" >
								经验
							</td>
							<td height="100px">
								<textarea name="experience" style="width: 100%;height: 100%"><%=experience %></textarea>
							</td>
					</tr>
					<tr height="100px">
							<td class="field" >
								不足
							</td>
							<td height="100px">
								<textarea name="deficiency" style="width: 100%;height: 100%"><%=deficiency %></textarea>
							</td>
					</tr>
					<tr height="100px">
							<td class="field" >
								整改措施
							</td>
							<td height="100px">
								<textarea name="remedy" style="width: 100%;height: 100%"><%=remedy %></textarea>
							</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td colspan="2" class="tableBtn">
				<span onclick="doSubmit();">确定</span>
				<span onclick="window.close();">取消</span>
			</td>
		</tr>
		<tr valign="top">
			<td colspan="2">
				&nbsp;
			</td>
		</tr>
	</table>
	</form>
	<iframe src="#" frameborder="0" id="treeFrame" name="frame" style="display: none;position: absolute;"></iframe>
	<iframe src="#" name="actionFrame" style="display: none;"></iframe>
</body>
</html>